<div id="imgup" style="text-align:left;">

<style type="text/css">
.progressBar .border { background-color: #fff; border: 1px solid #fff; width: 100%; }
.progressBar .background { background-color: #333; height: 10px; width: 0%; }
</style>
<%call = remote_function(:update => "visiontoolview",
                         :url => { 
                         :action => "visionlist" ,
                         :loading => "Element.show('vision_spinner')",
                         :loaded => "Element.hide('vision_spinner')",
                         :complete => "Element.show('droper')" 
                         })%>
      
<%= form_tag_with_upload_progress({:action => 'upload'}, { :begin => "new Effect.Appear('status')", :finish => "$('uploadmessage').innerHTML = arguments[0]; #{call};" }) %>
<p>
<%=_ "Image upload"%>:
<br /><%= file_field 'vision', 'uploaded_data', :size => 12 -%></p>
<%= submit_tag _ 'Upload'-%>
</form>

<div id='status' style="display: none"><%= upload_status_tag %></div>
<div id="uploadmessage"><%= @message %></div>
</div>